Integrand size = 28, antiderivative size = 271 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2} \, dx=\frac {\left (c^4+4 i c^3 d-6 c^2 d^2+12 i c d^3+9 d^4\right ) x}{4 a^2 (c-i d)^2 (c+i d)^4}-\frac {2 (2 c-i d) d^3 \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 (c-i d)^2 (c+i d)^4 f}+\frac {d \left (c^2+4 i c d+9 d^2\right )}{4 a^2 (c-i d) (c+i d)^3 f (c+d \tan (e+f x))}+\frac {i c-4 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \]
[Out]
Time = 0.65 (sec) , antiderivative size = 271, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {3640, 3677, 3610, 3612, 3611} \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2} \, dx=\frac {d \left (c^2+4 i c d+9 d^2\right )}{4 a^2 f (c-i d) (c+i d)^3 (c+d \tan (e+f x))}+\frac {x \left (c^4+4 i c^3 d-6 c^2 d^2+12 i c d^3+9 d^4\right )}{4 a^2 (c-i d)^2 (c+i d)^4}-\frac {2 d^3 (2 c-i d) \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 f (c-i d)^2 (c+i d)^4}+\frac {-4 d+i c}{4 a^2 f (c+i d)^2 (1+i \tan (e+f x)) (c+d \tan (e+f x))}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \]
[In]
[Out]
Rule 3610
Rule 3611
Rule 3612
Rule 3640
Rule 3677
Rubi steps \begin{align*} \text {integral}& = -\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))}-\frac {\int \frac {-a (2 i c-5 d)-3 i a d \tan (e+f x)}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))^2} \, dx}{4 a^2 (i c-d)} \\ & = \frac {i c-4 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))}-\frac {\int \frac {-2 a^2 \left (c^2+4 i c d-9 d^2\right )-4 a^2 (c+4 i d) d \tan (e+f x)}{(c+d \tan (e+f x))^2} \, dx}{8 a^4 (c+i d)^2} \\ & = \frac {d \left (c^2+4 i c d+9 d^2\right )}{4 a^2 (c+i d)^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))}+\frac {i c-4 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))}-\frac {\int \frac {-2 a^2 \left (c^3+4 i c^2 d-7 c d^2+8 i d^3\right )-2 a^2 d \left (c^2+4 i c d+9 d^2\right ) \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{8 a^4 (c+i d)^2 \left (c^2+d^2\right )} \\ & = \frac {\left (c^4+4 i c^3 d-6 c^2 d^2+12 i c d^3+9 d^4\right ) x}{4 a^2 (c+i d)^2 \left (c^2+d^2\right )^2}+\frac {d \left (c^2+4 i c d+9 d^2\right )}{4 a^2 (c+i d)^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))}+\frac {i c-4 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))}-\frac {\left (2 (2 c-i d) d^3\right ) \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{a^2 (c+i d)^2 \left (c^2+d^2\right )^2} \\ & = \frac {\left (c^4+4 i c^3 d-6 c^2 d^2+12 i c d^3+9 d^4\right ) x}{4 a^2 (c+i d)^2 \left (c^2+d^2\right )^2}-\frac {2 (2 c-i d) d^3 \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 (c+i d)^2 \left (c^2+d^2\right )^2 f}+\frac {d \left (c^2+4 i c d+9 d^2\right )}{4 a^2 (c+i d)^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))}+\frac {i c-4 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \\ \end{align*}
Time = 3.23 (sec) , antiderivative size = 276, normalized size of antiderivative = 1.02 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2} \, dx=-\frac {\frac {2 (c+4 i d) ((i c+d) \log (i-\tan (e+f x))+(-i c+d) \log (i+\tan (e+f x))-2 d \log (c+d \tan (e+f x)))}{c^2+d^2}+\frac {2 i (c+i d)}{(-i+\tan (e+f x))^2 (c+d \tan (e+f x))}-\frac {2 (c+4 i d)}{(-i+\tan (e+f x)) (c+d \tan (e+f x))}-\left (c^2+4 i c d+9 d^2\right ) \left (\frac {i \log (i-\tan (e+f x))}{(c+i d)^2}-\frac {i \log (i+\tan (e+f x))}{(c-i d)^2}+\frac {2 d \left (-2 c \log (c+d \tan (e+f x))+\frac {c^2+d^2}{c+d \tan (e+f x)}\right )}{\left (c^2+d^2\right )^2}\right )}{8 a^2 (c+i d)^2 f} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 571 vs. \(2 (248 ) = 496\).
Time = 0.77 (sec) , antiderivative size = 572, normalized size of antiderivative = 2.11
method | result | size |
derivativedivides | \(\frac {3 i c d}{2 f \,a^{2} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )}+\frac {\arctan \left (\tan \left (f x +e \right )\right )}{8 f \,a^{2} \left (i d -c \right )^{2}}+\frac {2 i d^{4} \ln \left (c +d \tan \left (f x +e \right )\right )}{f \,a^{2} \left (i d -c \right )^{2} \left (i d +c \right )^{4}}+\frac {3 i \arctan \left (\tan \left (f x +e \right )\right ) c d}{4 f \,a^{2} \left (i d +c \right )^{4}}+\frac {3 \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c d}{8 f \,a^{2} \left (i d +c \right )^{4}}+\frac {\arctan \left (\tan \left (f x +e \right )\right ) c^{2}}{8 f \,a^{2} \left (i d +c \right )^{4}}-\frac {17 \arctan \left (\tan \left (f x +e \right )\right ) d^{2}}{8 f \,a^{2} \left (i d +c \right )^{4}}+\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{16 f \,a^{2} \left (i d -c \right )^{2}}+\frac {17 i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) d^{2}}{16 f \,a^{2} \left (i d +c \right )^{4}}+\frac {c^{2}}{4 f \,a^{2} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )}-\frac {5 d^{2}}{4 f \,a^{2} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )}+\frac {i d^{2}}{4 f \,a^{2} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c^{2}}{16 f \,a^{2} \left (i d +c \right )^{4}}+\frac {c d}{2 f \,a^{2} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {d^{3} c^{2}}{f \,a^{2} \left (i d -c \right )^{2} \left (i d +c \right )^{4} \left (c +d \tan \left (f x +e \right )\right )}+\frac {d^{5}}{f \,a^{2} \left (i d -c \right )^{2} \left (i d +c \right )^{4} \left (c +d \tan \left (f x +e \right )\right )}-\frac {i c^{2}}{4 f \,a^{2} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {4 d^{3} \ln \left (c +d \tan \left (f x +e \right )\right ) c}{f \,a^{2} \left (i d -c \right )^{2} \left (i d +c \right )^{4}}\) | \(572\) |
default | \(\frac {3 i c d}{2 f \,a^{2} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )}+\frac {\arctan \left (\tan \left (f x +e \right )\right )}{8 f \,a^{2} \left (i d -c \right )^{2}}+\frac {2 i d^{4} \ln \left (c +d \tan \left (f x +e \right )\right )}{f \,a^{2} \left (i d -c \right )^{2} \left (i d +c \right )^{4}}+\frac {3 i \arctan \left (\tan \left (f x +e \right )\right ) c d}{4 f \,a^{2} \left (i d +c \right )^{4}}+\frac {3 \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c d}{8 f \,a^{2} \left (i d +c \right )^{4}}+\frac {\arctan \left (\tan \left (f x +e \right )\right ) c^{2}}{8 f \,a^{2} \left (i d +c \right )^{4}}-\frac {17 \arctan \left (\tan \left (f x +e \right )\right ) d^{2}}{8 f \,a^{2} \left (i d +c \right )^{4}}+\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{16 f \,a^{2} \left (i d -c \right )^{2}}+\frac {17 i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) d^{2}}{16 f \,a^{2} \left (i d +c \right )^{4}}+\frac {c^{2}}{4 f \,a^{2} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )}-\frac {5 d^{2}}{4 f \,a^{2} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )}+\frac {i d^{2}}{4 f \,a^{2} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c^{2}}{16 f \,a^{2} \left (i d +c \right )^{4}}+\frac {c d}{2 f \,a^{2} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {d^{3} c^{2}}{f \,a^{2} \left (i d -c \right )^{2} \left (i d +c \right )^{4} \left (c +d \tan \left (f x +e \right )\right )}+\frac {d^{5}}{f \,a^{2} \left (i d -c \right )^{2} \left (i d +c \right )^{4} \left (c +d \tan \left (f x +e \right )\right )}-\frac {i c^{2}}{4 f \,a^{2} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {4 d^{3} \ln \left (c +d \tan \left (f x +e \right )\right ) c}{f \,a^{2} \left (i d -c \right )^{2} \left (i d +c \right )^{4}}\) | \(572\) |
risch | \(-\frac {x}{4 a^{2} \left (2 i c d -c^{2}+d^{2}\right )}-\frac {3 \,{\mathrm e}^{-2 i \left (f x +e \right )} d}{4 a^{2} \left (2 i c d +c^{2}-d^{2}\right ) \left (i d +c \right ) f}+\frac {i {\mathrm e}^{-2 i \left (f x +e \right )} c}{4 a^{2} \left (2 i c d +c^{2}-d^{2}\right ) \left (i d +c \right ) f}+\frac {i {\mathrm e}^{-4 i \left (f x +e \right )}}{16 a^{2} \left (2 i c d +c^{2}-d^{2}\right ) f}+\frac {4 d^{4} x}{a^{2} \left (2 i c^{5} d +4 i c^{3} d^{3}+2 i c \,d^{5}+c^{6}+c^{4} d^{2}-c^{2} d^{4}-d^{6}\right )}+\frac {4 d^{4} e}{a^{2} f \left (2 i c^{5} d +4 i c^{3} d^{3}+2 i c \,d^{5}+c^{6}+c^{4} d^{2}-c^{2} d^{4}-d^{6}\right )}+\frac {8 i d^{3} c x}{a^{2} \left (2 i c^{5} d +4 i c^{3} d^{3}+2 i c \,d^{5}+c^{6}+c^{4} d^{2}-c^{2} d^{4}-d^{6}\right )}+\frac {8 i d^{3} c e}{a^{2} f \left (2 i c^{5} d +4 i c^{3} d^{3}+2 i c \,d^{5}+c^{6}+c^{4} d^{2}-c^{2} d^{4}-d^{6}\right )}-\frac {2 i d^{4}}{\left (-i c +d \right )^{3} f \,a^{2} \left (i c +d \right )^{2} \left ({\mathrm e}^{2 i \left (f x +e \right )} d +i c \,{\mathrm e}^{2 i \left (f x +e \right )}-d +i c \right )}+\frac {2 i d^{4} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right )}{a^{2} f \left (2 i c^{5} d +4 i c^{3} d^{3}+2 i c \,d^{5}+c^{6}+c^{4} d^{2}-c^{2} d^{4}-d^{6}\right )}-\frac {4 d^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right ) c}{a^{2} f \left (2 i c^{5} d +4 i c^{3} d^{3}+2 i c \,d^{5}+c^{6}+c^{4} d^{2}-c^{2} d^{4}-d^{6}\right )}\) | \(627\) |
norman | \(\frac {\frac {4 i c -7 d}{8 a f \left (2 i c d +c^{2}-d^{2}\right )}+\frac {3 d \left (\tan ^{4}\left (f x +e \right )\right )}{8 a f \left (2 i c d +c^{2}-d^{2}\right )}+\frac {\left (4 i c^{4} d +12 i c^{2} d^{3}+c^{5}-6 c^{3} d^{2}+9 c \,d^{4}\right ) x}{4 \left (-i d +c \right )^{2} \left (i d +c \right )^{4} a}+\frac {\left (4 i c^{4} d +12 i c^{2} d^{3}+c^{5}-6 c^{3} d^{2}+9 c \,d^{4}\right ) x \left (\tan ^{2}\left (f x +e \right )\right )}{2 \left (-i d +c \right )^{2} \left (i d +c \right )^{4} a}+\frac {\left (4 i c^{4} d +12 i c^{2} d^{3}+c^{5}-6 c^{3} d^{2}+9 c \,d^{4}\right ) x \left (\tan ^{4}\left (f x +e \right )\right )}{4 \left (-i d +c \right )^{2} \left (i d +c \right )^{4} a}-\frac {d \left (4 i c^{3} d +12 i c \,d^{3}+c^{4}-6 c^{2} d^{2}+9 d^{4}\right ) x \tan \left (f x +e \right )}{4 \left (i c +d \right )^{2} \left (-i c +d \right )^{4} a}-\frac {d \left (4 i c^{3} d +12 i c \,d^{3}+c^{4}-6 c^{2} d^{2}+9 d^{4}\right ) x \left (\tan ^{3}\left (f x +e \right )\right )}{2 \left (i c +d \right )^{2} \left (-i c +d \right )^{4} a}-\frac {d \left (4 i c^{3} d +12 i c \,d^{3}+c^{4}-6 c^{2} d^{2}+9 d^{4}\right ) x \left (\tan ^{5}\left (f x +e \right )\right )}{4 \left (i c +d \right )^{2} \left (-i c +d \right )^{4} a}+\frac {\left (-12 i c^{3} d -4 i c \,d^{3}-6 c^{4}-7 c^{2} d^{2}+15 d^{4}\right ) \tan \left (f x +e \right )}{8 a f \left (i c +d \right ) \left (-i c +d \right )^{3} c}+\frac {\left (-4 i c^{3} d +4 i c \,d^{3}-c^{4}-2 c^{2} d^{2}+15 d^{4}\right ) \left (\tan ^{3}\left (f x +e \right )\right )}{4 a f \left (i c +d \right ) \left (-i c +d \right )^{3} c}+\frac {d \left (8 i c \,d^{2}-c^{2} d +15 d^{3}\right ) \left (\tan ^{5}\left (f x +e \right )\right )}{8 a f \left (i c +d \right ) \left (-i c +d \right )^{3} c}}{a \left (c +d \tan \left (f x +e \right )\right ) \left (1+\tan ^{2}\left (f x +e \right )\right )^{2}}+\frac {\left (-i d^{4}+2 c \,d^{3}\right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{a^{2} f \left (2 i c^{5} d +4 i c^{3} d^{3}+2 i c \,d^{5}+c^{6}+c^{4} d^{2}-c^{2} d^{4}-d^{6}\right )}-\frac {2 \left (-i d^{4}+2 c \,d^{3}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{a^{2} f \left (2 i c^{5} d +4 i c^{3} d^{3}+2 i c \,d^{5}+c^{6}+c^{4} d^{2}-c^{2} d^{4}-d^{6}\right )}\) | \(814\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 505 vs. \(2 (233) = 466\).
Time = 0.25 (sec) , antiderivative size = 505, normalized size of antiderivative = 1.86 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2} \, dx=-\frac {c^{5} + i \, c^{4} d + 2 \, c^{3} d^{2} + 2 i \, c^{2} d^{3} + c d^{4} + i \, d^{5} - 4 \, {\left (i \, c^{5} - 3 \, c^{4} d - 2 i \, c^{3} d^{2} - 34 \, c^{2} d^{3} + 45 i \, c d^{4} + 17 \, d^{5}\right )} f x e^{\left (6 i \, f x + 6 i \, e\right )} + 4 \, {\left (c^{5} + i \, c^{4} d + 6 \, c^{3} d^{2} - 2 i \, c^{2} d^{3} - 3 \, c d^{4} - 11 i \, d^{5} - {\left (i \, c^{5} - 5 \, c^{4} d - 10 i \, c^{3} d^{2} - 22 \, c^{2} d^{3} - 11 i \, c d^{4} - 17 \, d^{5}\right )} f x\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (5 \, c^{5} + 11 i \, c^{4} d + 10 \, c^{3} d^{2} + 22 i \, c^{2} d^{3} + 5 \, c d^{4} + 11 i \, d^{5}\right )} e^{\left (2 i \, f x + 2 i \, e\right )} - 32 \, {\left ({\left (-2 i \, c^{2} d^{3} - 3 \, c d^{4} + i \, d^{5}\right )} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (-2 i \, c^{2} d^{3} + c d^{4} - i \, d^{5}\right )} e^{\left (4 i \, f x + 4 i \, e\right )}\right )} \log \left (\frac {{\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d}{i \, c + d}\right )}{16 \, {\left ({\left (i \, a^{2} c^{7} - a^{2} c^{6} d + 3 i \, a^{2} c^{5} d^{2} - 3 \, a^{2} c^{4} d^{3} + 3 i \, a^{2} c^{3} d^{4} - 3 \, a^{2} c^{2} d^{5} + i \, a^{2} c d^{6} - a^{2} d^{7}\right )} f e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (i \, a^{2} c^{7} - 3 \, a^{2} c^{6} d - i \, a^{2} c^{5} d^{2} - 5 \, a^{2} c^{4} d^{3} - 5 i \, a^{2} c^{3} d^{4} - a^{2} c^{2} d^{5} - 3 i \, a^{2} c d^{6} + a^{2} d^{7}\right )} f e^{\left (4 i \, f x + 4 i \, e\right )}\right )}} \]
[In]
[Out]
Time = 26.28 (sec) , antiderivative size = 966, normalized size of antiderivative = 3.56 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2} \, dx=- \frac {2 i d^{4}}{a^{2} c^{6} f + 2 i a^{2} c^{5} d f + a^{2} c^{4} d^{2} f + 4 i a^{2} c^{3} d^{3} f - a^{2} c^{2} d^{4} f + 2 i a^{2} c d^{5} f - a^{2} d^{6} f + \left (a^{2} c^{6} f e^{2 i e} + 3 a^{2} c^{4} d^{2} f e^{2 i e} + 3 a^{2} c^{2} d^{4} f e^{2 i e} + a^{2} d^{6} f e^{2 i e}\right ) e^{2 i f x}} + \frac {x \left (c^{2} + 6 i c d - 17 d^{2}\right )}{4 a^{2} c^{4} + 16 i a^{2} c^{3} d - 24 a^{2} c^{2} d^{2} - 16 i a^{2} c d^{3} + 4 a^{2} d^{4}} + \begin {cases} \frac {\left (4 i a^{2} c^{3} f e^{2 i e} - 12 a^{2} c^{2} d f e^{2 i e} - 12 i a^{2} c d^{2} f e^{2 i e} + 4 a^{2} d^{3} f e^{2 i e}\right ) e^{- 4 i f x} + \left (16 i a^{2} c^{3} f e^{4 i e} - 80 a^{2} c^{2} d f e^{4 i e} - 112 i a^{2} c d^{2} f e^{4 i e} + 48 a^{2} d^{3} f e^{4 i e}\right ) e^{- 2 i f x}}{64 a^{4} c^{5} f^{2} e^{6 i e} + 320 i a^{4} c^{4} d f^{2} e^{6 i e} - 640 a^{4} c^{3} d^{2} f^{2} e^{6 i e} - 640 i a^{4} c^{2} d^{3} f^{2} e^{6 i e} + 320 a^{4} c d^{4} f^{2} e^{6 i e} + 64 i a^{4} d^{5} f^{2} e^{6 i e}} & \text {for}\: 64 a^{4} c^{5} f^{2} e^{6 i e} + 320 i a^{4} c^{4} d f^{2} e^{6 i e} - 640 a^{4} c^{3} d^{2} f^{2} e^{6 i e} - 640 i a^{4} c^{2} d^{3} f^{2} e^{6 i e} + 320 a^{4} c d^{4} f^{2} e^{6 i e} + 64 i a^{4} d^{5} f^{2} e^{6 i e} \neq 0 \\x \left (- \frac {c^{2} + 6 i c d - 17 d^{2}}{4 a^{2} c^{4} + 16 i a^{2} c^{3} d - 24 a^{2} c^{2} d^{2} - 16 i a^{2} c d^{3} + 4 a^{2} d^{4}} + \frac {c^{2} e^{4 i e} + 2 c^{2} e^{2 i e} + c^{2} + 6 i c d e^{4 i e} + 8 i c d e^{2 i e} + 2 i c d - 17 d^{2} e^{4 i e} - 6 d^{2} e^{2 i e} - d^{2}}{4 a^{2} c^{4} e^{4 i e} + 16 i a^{2} c^{3} d e^{4 i e} - 24 a^{2} c^{2} d^{2} e^{4 i e} - 16 i a^{2} c d^{3} e^{4 i e} + 4 a^{2} d^{4} e^{4 i e}}\right ) & \text {otherwise} \end {cases} - \frac {2 d^{3} \cdot \left (2 c - i d\right ) \log {\left (\frac {c + i d}{c e^{2 i e} - i d e^{2 i e}} + e^{2 i f x} \right )}}{a^{2} f \left (c - i d\right )^{2} \left (c + i d\right )^{4}} \]
[In]
[Out]
Exception generated. \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 479 vs. \(2 (233) = 466\).
Time = 0.57 (sec) , antiderivative size = 479, normalized size of antiderivative = 1.77 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2} \, dx=-\frac {\frac {2 \, {\left (2 \, c d^{4} - i \, d^{5}\right )} \log \left (d \tan \left (f x + e\right ) + c\right )}{a^{2} c^{6} d + 2 i \, a^{2} c^{5} d^{2} + a^{2} c^{4} d^{3} + 4 i \, a^{2} c^{3} d^{4} - a^{2} c^{2} d^{5} + 2 i \, a^{2} c d^{6} - a^{2} d^{7}} - \frac {2 \, {\left (c^{2} + 6 i \, c d - 17 \, d^{2}\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{16 i \, a^{2} c^{4} - 64 \, a^{2} c^{3} d - 96 i \, a^{2} c^{2} d^{2} + 64 \, a^{2} c d^{3} + 16 i \, a^{2} d^{4}} + \frac {2 \, \log \left (\tan \left (f x + e\right ) + i\right )}{16 i \, a^{2} c^{2} + 32 \, a^{2} c d - 16 i \, a^{2} d^{2}} - \frac {4 \, c d^{4} \tan \left (f x + e\right ) - 2 i \, d^{5} \tan \left (f x + e\right ) + 5 \, c^{2} d^{3} - 2 i \, c d^{4} + d^{5}}{{\left (a^{2} c^{6} + 2 i \, a^{2} c^{5} d + a^{2} c^{4} d^{2} + 4 i \, a^{2} c^{3} d^{3} - a^{2} c^{2} d^{4} + 2 i \, a^{2} c d^{5} - a^{2} d^{6}\right )} {\left (d \tan \left (f x + e\right ) + c\right )}} + \frac {2 \, {\left (3 \, c^{2} \tan \left (f x + e\right )^{2} + 18 i \, c d \tan \left (f x + e\right )^{2} - 51 \, d^{2} \tan \left (f x + e\right )^{2} - 10 i \, c^{2} \tan \left (f x + e\right ) + 60 \, c d \tan \left (f x + e\right ) + 122 i \, d^{2} \tan \left (f x + e\right ) - 11 \, c^{2} - 50 i \, c d + 75 \, d^{2}\right )}}{-32 \, {\left (-i \, a^{2} c^{4} + 4 \, a^{2} c^{3} d + 6 i \, a^{2} c^{2} d^{2} - 4 \, a^{2} c d^{3} - i \, a^{2} d^{4}\right )} {\left (\tan \left (f x + e\right ) - i\right )}^{2}}}{f} \]
[In]
[Out]
Time = 11.94 (sec) , antiderivative size = 1984, normalized size of antiderivative = 7.32 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2} \, dx=\text {Too large to display} \]
[In]
[Out]